3.18 \(\int \frac {c+d x}{a+a \coth (e+f x)} \, dx\)

Optimal. Leaf size=74 \[ -\frac {c+d x}{2 f (a \coth (e+f x)+a)}+\frac {(c+d x)^2}{4 a d}-\frac {d}{4 f^2 (a \coth (e+f x)+a)}+\frac {d x}{4 a f} \]

[Out]

1/4*d*x/a/f+1/4*(d*x+c)^2/a/d-1/4*d/f^2/(a+a*coth(f*x+e))+1/2*(-d*x-c)/f/(a+a*coth(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3723, 3479, 8} \[ -\frac {c+d x}{2 f (a \coth (e+f x)+a)}+\frac {(c+d x)^2}{4 a d}-\frac {d}{4 f^2 (a \coth (e+f x)+a)}+\frac {d x}{4 a f} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(a + a*Coth[e + f*x]),x]

[Out]

(d*x)/(4*a*f) + (c + d*x)^2/(4*a*d) - d/(4*f^2*(a + a*Coth[e + f*x])) - (c + d*x)/(2*f*(a + a*Coth[e + f*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3479

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(a + b*Tan[c + d*x])^n)/(2*b*d*n), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rule 3723

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + d*x)^(m + 1)/(2*
a*d*(m + 1)), x] + (Dist[(a*d*m)/(2*b*f), Int[(c + d*x)^(m - 1)/(a + b*Tan[e + f*x]), x], x] - Simp[(a*(c + d*
x)^m)/(2*b*f*(a + b*Tan[e + f*x])), x]) /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {c+d x}{a+a \coth (e+f x)} \, dx &=\frac {(c+d x)^2}{4 a d}-\frac {c+d x}{2 f (a+a \coth (e+f x))}+\frac {d \int \frac {1}{a+a \coth (e+f x)} \, dx}{2 f}\\ &=\frac {(c+d x)^2}{4 a d}-\frac {d}{4 f^2 (a+a \coth (e+f x))}-\frac {c+d x}{2 f (a+a \coth (e+f x))}+\frac {d \int 1 \, dx}{4 a f}\\ &=\frac {d x}{4 a f}+\frac {(c+d x)^2}{4 a d}-\frac {d}{4 f^2 (a+a \coth (e+f x))}-\frac {c+d x}{2 f (a+a \coth (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.29, size = 81, normalized size = 1.09 \[ \frac {\left (2 c f (2 f x+1)+d \left (2 f^2 x^2+2 f x+1\right )\right ) \coth (e+f x)+2 c f (2 f x-1)+d \left (2 f^2 x^2-2 f x-1\right )}{8 a f^2 (\coth (e+f x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(a + a*Coth[e + f*x]),x]

[Out]

(2*c*f*(-1 + 2*f*x) + d*(-1 - 2*f*x + 2*f^2*x^2) + (2*c*f*(1 + 2*f*x) + d*(1 + 2*f*x + 2*f^2*x^2))*Coth[e + f*
x])/(8*a*f^2*(1 + Coth[e + f*x]))

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 101, normalized size = 1.36 \[ \frac {{\left (2 \, d f^{2} x^{2} + 2 \, c f + 2 \, {\left (2 \, c f^{2} + d f\right )} x + d\right )} \cosh \left (f x + e\right ) + {\left (2 \, d f^{2} x^{2} - 2 \, c f + 2 \, {\left (2 \, c f^{2} - d f\right )} x - d\right )} \sinh \left (f x + e\right )}{8 \, {\left (a f^{2} \cosh \left (f x + e\right ) + a f^{2} \sinh \left (f x + e\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e)),x, algorithm="fricas")

[Out]

1/8*((2*d*f^2*x^2 + 2*c*f + 2*(2*c*f^2 + d*f)*x + d)*cosh(f*x + e) + (2*d*f^2*x^2 - 2*c*f + 2*(2*c*f^2 - d*f)*
x - d)*sinh(f*x + e))/(a*f^2*cosh(f*x + e) + a*f^2*sinh(f*x + e))

________________________________________________________________________________________

giac [A]  time = 0.13, size = 65, normalized size = 0.88 \[ \frac {{\left (2 \, d f^{2} x^{2} e^{\left (2 \, f x + 2 \, e\right )} + 4 \, c f^{2} x e^{\left (2 \, f x + 2 \, e\right )} + 2 \, d f x + 2 \, c f + d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{8 \, a f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e)),x, algorithm="giac")

[Out]

1/8*(2*d*f^2*x^2*e^(2*f*x + 2*e) + 4*c*f^2*x*e^(2*f*x + 2*e) + 2*d*f*x + 2*c*f + d)*e^(-2*f*x - 2*e)/(a*f^2)

________________________________________________________________________________________

maple [B]  time = 0.38, size = 175, normalized size = 2.36 \[ \frac {-\frac {d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}+\frac {d \left (\frac {\left (f x +e \right ) \left (\cosh ^{2}\left (f x +e \right )\right )}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )}{f}+\frac {d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}-\frac {d e \left (\cosh ^{2}\left (f x +e \right )\right )}{2 f}-c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )+\frac {c \left (\cosh ^{2}\left (f x +e \right )\right )}{2}}{a f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/(a+a*coth(f*x+e)),x)

[Out]

1/a/f*(-1/f*d*(1/2*(f*x+e)*cosh(f*x+e)*sinh(f*x+e)-1/4*(f*x+e)^2-1/4*cosh(f*x+e)^2)+1/f*d*(1/2*(f*x+e)*cosh(f*
x+e)^2-1/4*cosh(f*x+e)*sinh(f*x+e)-1/4*f*x-1/4*e)+d*e/f*(1/2*cosh(f*x+e)*sinh(f*x+e)-1/2*f*x-1/2*e)-1/2*d*e/f*
cosh(f*x+e)^2-c*(1/2*cosh(f*x+e)*sinh(f*x+e)-1/2*f*x-1/2*e)+1/2*c*cosh(f*x+e)^2)

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 72, normalized size = 0.97 \[ \frac {1}{4} \, c {\left (\frac {2 \, {\left (f x + e\right )}}{a f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{a f}\right )} + \frac {{\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} + {\left (2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} d e^{\left (-2 \, e\right )}}{8 \, a f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e)),x, algorithm="maxima")

[Out]

1/4*c*(2*(f*x + e)/(a*f) + e^(-2*f*x - 2*e)/(a*f)) + 1/8*(2*f^2*x^2*e^(2*e) + (2*f*x + 1)*e^(-2*f*x))*d*e^(-2*
e)/(a*f^2)

________________________________________________________________________________________

mupad [B]  time = 1.26, size = 76, normalized size = 1.03 \[ \frac {\frac {d\,x^2}{4}+\left (\frac {c}{2}+\frac {d}{4\,f}\right )\,x}{a}-\frac {\frac {\frac {d}{4}+\frac {c\,f}{2}}{f^2}-x\,\left (\frac {c}{2}-\frac {d}{4\,f}\right )+x\,\left (\frac {c}{2}+\frac {d}{4\,f}\right )}{a+a\,\mathrm {coth}\left (e+f\,x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(a + a*coth(e + f*x)),x)

[Out]

(x*(c/2 + d/(4*f)) + (d*x^2)/4)/a - ((d/4 + (c*f)/2)/f^2 - x*(c/2 - d/(4*f)) + x*(c/2 + d/(4*f)))/(a + a*coth(
e + f*x))

________________________________________________________________________________________

sympy [A]  time = 0.89, size = 250, normalized size = 3.38 \[ \begin {cases} \frac {2 c f^{2} x \tanh {\left (e + f x \right )}}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} + \frac {2 c f^{2} x}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} + \frac {2 c f}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} + \frac {d f^{2} x^{2} \tanh {\left (e + f x \right )}}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} + \frac {d f^{2} x^{2}}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} - \frac {d f x \tanh {\left (e + f x \right )}}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} + \frac {d f x}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} + \frac {d}{4 a f^{2} \tanh {\left (e + f x \right )} + 4 a f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{a \coth {\relax (e )} + a} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*coth(f*x+e)),x)

[Out]

Piecewise((2*c*f**2*x*tanh(e + f*x)/(4*a*f**2*tanh(e + f*x) + 4*a*f**2) + 2*c*f**2*x/(4*a*f**2*tanh(e + f*x) +
 4*a*f**2) + 2*c*f/(4*a*f**2*tanh(e + f*x) + 4*a*f**2) + d*f**2*x**2*tanh(e + f*x)/(4*a*f**2*tanh(e + f*x) + 4
*a*f**2) + d*f**2*x**2/(4*a*f**2*tanh(e + f*x) + 4*a*f**2) - d*f*x*tanh(e + f*x)/(4*a*f**2*tanh(e + f*x) + 4*a
*f**2) + d*f*x/(4*a*f**2*tanh(e + f*x) + 4*a*f**2) + d/(4*a*f**2*tanh(e + f*x) + 4*a*f**2), Ne(f, 0)), ((c*x +
 d*x**2/2)/(a*coth(e) + a), True))

________________________________________________________________________________________